/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:26554
 * Date:2024-11-06
 * Time:19:25
 */
public class Test {
    public int aMethod(){
        static int i = 0;
        i++;
        return i;
    }
    public static void main(String args[]){
        Test test = new Test();
        test.aMethod();
        int j = test.aMethod();
        System.out.println(j);
    }
}
Test test = new Test();